API Documentation
Static Public Member Functions | List of all members
nkGraphics::StructToString Class Reference

Converts enums to string, and vice versa. More...

Static Public Member Functions

static nkMemory::StringView getShaderTypeString (SHADER_TYPE val)
 
static SHADER_TYPE getStringShaderType (const nkMemory::StringView &str)
 
static nkMemory::StringView getShaderSemanticString (SHADER_SEMANTIC val)
 
static SHADER_SEMANTIC getStringShaderSemantic (const nkMemory::StringView &str)
 
static nkMemory::StringView getProgramProfileString (PROGRAM_COMPILATION_PROFILE val)
 
static PROGRAM_COMPILATION_PROFILE getStringProgramProfile (const nkMemory::StringView &str)
 
static const char * getBlendString (BLEND val)
 
static BLEND getStringBlend (const nkMemory::StringView &str)
 
static BLEND getBlendFromIndex (unsigned int index)
 
static nkMemory::StringView getBlendOpString (BLEND_OP val)
 
static BLEND_OP getStringBlendOp (const nkMemory::StringView &str)
 
static BLEND_OP getBlendOpFromIndex (unsigned int index)
 
static nkMemory::StringView getWriteMaskString (COLOR_WRITE_ENABLE val)
 
static COLOR_WRITE_ENABLE getStringWriteMask (const nkMemory::StringView &str)
 
static COLOR_WRITE_ENABLE getWriteMaskFromIndex (unsigned int index)
 
static nkMemory::StringView getComparisonFuncString (COMPARISON_FUNC val)
 
static COMPARISON_FUNC getStringComparisonFunc (const nkMemory::StringView &str)
 
static COMPARISON_FUNC getComparisonFuncFromIndex (unsigned int index)
 
static nkMemory::StringView getDepthWriteMaskString (DEPTH_WRITE_MASK val)
 
static DEPTH_WRITE_MASK getStringDepthWriteMask (const nkMemory::StringView &str)
 
static DEPTH_WRITE_MASK getDepthWriteMaskFromIndex (unsigned int index)
 
static nkMemory::StringView getStencilOpString (STENCIL_OP val)
 
static STENCIL_OP getStringStencilOp (const nkMemory::StringView &str)
 
static STENCIL_OP getStencilOpFromIndex (unsigned int index)
 
static nkMemory::StringView getFillModeString (FILL_MODE val)
 
static FILL_MODE getStringFillMode (const nkMemory::StringView &str)
 
static FILL_MODE getFillModeFromIndex (unsigned int index)
 
static nkMemory::StringView getCullModeString (CULL_MODE val)
 
static CULL_MODE getStringCullMode (const nkMemory::StringView &str)
 
static CULL_MODE getCullModeFromIndex (unsigned int index)
 
static nkMemory::StringView getAddressModeString (TEXTURE_ADDRESS_MODE val)
 
static TEXTURE_ADDRESS_MODE getStringAddressMode (const nkMemory::StringView &str)
 
static TEXTURE_ADDRESS_MODE getAddressModeFromIndex (unsigned int index)
 
static nkMemory::StringView getFilteringString (FILTER val)
 
static FILTER getStringFiltering (const nkMemory::StringView &str)
 
static FILTER getFilteringFromIndex (unsigned int index)
 
static nkMemory::StringView getUsageString (USAGE val)
 
static USAGE getStringUsage (const nkMemory::StringView &str)
 
static USAGE getUsageFromIndex (unsigned int index)
 
static nkMemory::StringView getFormatString (FORMAT val)
 
static FORMAT getStringFormat (const nkMemory::StringView &str)
 
static FORMAT getFormatFromIndex (unsigned int index)
 
static nkMemory::StringView getBindFlagString (BIND_FLAG val)
 
static BIND_FLAG getStringBindFlag (const nkMemory::StringView &str)
 
static BIND_FLAG getBindFlagFromIndex (unsigned int index)
 
static nkMemory::StringView getCpuAccessFlagString (CPU_ACCESS_FLAG val)
 
static CPU_ACCESS_FLAG getStringCpuAccessFlag (const nkMemory::StringView &str)
 
static CPU_ACCESS_FLAG getCpuAccessFlagFromIndex (unsigned int index)
 
static nkMemory::StringView getMiscFlagString (RESOURCE_MISC_FLAG val)
 
static RESOURCE_MISC_FLAG getStringMiscFlag (const nkMemory::StringView &str)
 
static RESOURCE_MISC_FLAG getMiscFlagFromIndex (unsigned int index)
 
static nkMemory::StringView getPassTypeString (PASS_TYPE val)
 
static PASS_TYPE getStringPassType (const nkMemory::StringView &str)
 
static nkMemory::StringView getResourceTypeString (RESOURCE_TYPE val)
 
static RESOURCE_TYPE getStringResourceType (const nkMemory::StringView &str)
 
static nkMemory::StringView getTexRenderFlagString (TEX_RENDER_FLAG val)
 
static TEX_RENDER_FLAG getStringTexRenderFlag (const nkMemory::StringView &str)
 

Detailed Description

Converts enums to string, and vice versa.

Mainly used for error reporting and data exporting within the component.

Member Function Documentation

◆ getShaderTypeString()

static nkMemory::StringView nkGraphics::StructToString::getShaderTypeString ( SHADER_TYPE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringShaderType()

static SHADER_TYPE nkGraphics::StructToString::getStringShaderType ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getShaderSemanticString()

static nkMemory::StringView nkGraphics::StructToString::getShaderSemanticString ( SHADER_SEMANTIC  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringShaderSemantic()

static SHADER_SEMANTIC nkGraphics::StructToString::getStringShaderSemantic ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getProgramProfileString()

static nkMemory::StringView nkGraphics::StructToString::getProgramProfileString ( PROGRAM_COMPILATION_PROFILE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringProgramProfile()

static PROGRAM_COMPILATION_PROFILE nkGraphics::StructToString::getStringProgramProfile ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getBlendString()

static const char* nkGraphics::StructToString::getBlendString ( BLEND  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringBlend()

static BLEND nkGraphics::StructToString::getStringBlend ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getBlendFromIndex()

static BLEND nkGraphics::StructToString::getBlendFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getBlendOpString()

static nkMemory::StringView nkGraphics::StructToString::getBlendOpString ( BLEND_OP  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringBlendOp()

static BLEND_OP nkGraphics::StructToString::getStringBlendOp ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getBlendOpFromIndex()

static BLEND_OP nkGraphics::StructToString::getBlendOpFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getWriteMaskString()

static nkMemory::StringView nkGraphics::StructToString::getWriteMaskString ( COLOR_WRITE_ENABLE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringWriteMask()

static COLOR_WRITE_ENABLE nkGraphics::StructToString::getStringWriteMask ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getWriteMaskFromIndex()

static COLOR_WRITE_ENABLE nkGraphics::StructToString::getWriteMaskFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getComparisonFuncString()

static nkMemory::StringView nkGraphics::StructToString::getComparisonFuncString ( COMPARISON_FUNC  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringComparisonFunc()

static COMPARISON_FUNC nkGraphics::StructToString::getStringComparisonFunc ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getComparisonFuncFromIndex()

static COMPARISON_FUNC nkGraphics::StructToString::getComparisonFuncFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getDepthWriteMaskString()

static nkMemory::StringView nkGraphics::StructToString::getDepthWriteMaskString ( DEPTH_WRITE_MASK  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringDepthWriteMask()

static DEPTH_WRITE_MASK nkGraphics::StructToString::getStringDepthWriteMask ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getDepthWriteMaskFromIndex()

static DEPTH_WRITE_MASK nkGraphics::StructToString::getDepthWriteMaskFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getStencilOpString()

static nkMemory::StringView nkGraphics::StructToString::getStencilOpString ( STENCIL_OP  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringStencilOp()

static STENCIL_OP nkGraphics::StructToString::getStringStencilOp ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getStencilOpFromIndex()

static STENCIL_OP nkGraphics::StructToString::getStencilOpFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getFillModeString()

static nkMemory::StringView nkGraphics::StructToString::getFillModeString ( FILL_MODE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringFillMode()

static FILL_MODE nkGraphics::StructToString::getStringFillMode ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getFillModeFromIndex()

static FILL_MODE nkGraphics::StructToString::getFillModeFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getCullModeString()

static nkMemory::StringView nkGraphics::StructToString::getCullModeString ( CULL_MODE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringCullMode()

static CULL_MODE nkGraphics::StructToString::getStringCullMode ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getCullModeFromIndex()

static CULL_MODE nkGraphics::StructToString::getCullModeFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getAddressModeString()

static nkMemory::StringView nkGraphics::StructToString::getAddressModeString ( TEXTURE_ADDRESS_MODE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringAddressMode()

static TEXTURE_ADDRESS_MODE nkGraphics::StructToString::getStringAddressMode ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getAddressModeFromIndex()

static TEXTURE_ADDRESS_MODE nkGraphics::StructToString::getAddressModeFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getFilteringString()

static nkMemory::StringView nkGraphics::StructToString::getFilteringString ( FILTER  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringFiltering()

static FILTER nkGraphics::StructToString::getStringFiltering ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getFilteringFromIndex()

static FILTER nkGraphics::StructToString::getFilteringFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getUsageString()

static nkMemory::StringView nkGraphics::StructToString::getUsageString ( USAGE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringUsage()

static USAGE nkGraphics::StructToString::getStringUsage ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getUsageFromIndex()

static USAGE nkGraphics::StructToString::getUsageFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getFormatString()

static nkMemory::StringView nkGraphics::StructToString::getFormatString ( FORMAT  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringFormat()

static FORMAT nkGraphics::StructToString::getStringFormat ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getFormatFromIndex()

static FORMAT nkGraphics::StructToString::getFormatFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getBindFlagString()

static nkMemory::StringView nkGraphics::StructToString::getBindFlagString ( BIND_FLAG  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringBindFlag()

static BIND_FLAG nkGraphics::StructToString::getStringBindFlag ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getBindFlagFromIndex()

static BIND_FLAG nkGraphics::StructToString::getBindFlagFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getCpuAccessFlagString()

static nkMemory::StringView nkGraphics::StructToString::getCpuAccessFlagString ( CPU_ACCESS_FLAG  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringCpuAccessFlag()

static CPU_ACCESS_FLAG nkGraphics::StructToString::getStringCpuAccessFlag ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getCpuAccessFlagFromIndex()

static CPU_ACCESS_FLAG nkGraphics::StructToString::getCpuAccessFlagFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getMiscFlagString()

static nkMemory::StringView nkGraphics::StructToString::getMiscFlagString ( RESOURCE_MISC_FLAG  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringMiscFlag()

static RESOURCE_MISC_FLAG nkGraphics::StructToString::getStringMiscFlag ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getMiscFlagFromIndex()

static RESOURCE_MISC_FLAG nkGraphics::StructToString::getMiscFlagFromIndex ( unsigned int  index)
static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters
indexThe index of the enum to retrieve.
Returns
The enum value with index associated, -1 if no value available.

◆ getPassTypeString()

static nkMemory::StringView nkGraphics::StructToString::getPassTypeString ( PASS_TYPE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringPassType()

static PASS_TYPE nkGraphics::StructToString::getStringPassType ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getResourceTypeString()

static nkMemory::StringView nkGraphics::StructToString::getResourceTypeString ( RESOURCE_TYPE  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringResourceType()

static RESOURCE_TYPE nkGraphics::StructToString::getStringResourceType ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

◆ getTexRenderFlagString()

static nkMemory::StringView nkGraphics::StructToString::getTexRenderFlagString ( TEX_RENDER_FLAG  val)
static

Converts an enum entry to a string.

Parameters
valThe enum value to convert.
Returns
A string expressing the enum value.

◆ getStringTexRenderFlag()

static TEX_RENDER_FLAG nkGraphics::StructToString::getStringTexRenderFlag ( const nkMemory::StringView str)
static

Converts a string to an enum value.

Parameters
strThe string to convert.
Returns
The enum value associated with the string.

The documentation for this class was generated from the following file: